package geneComponent;

import java.util.List;

import base.Parameter;


public class Sub extends Function {
	
	public Sub(Parameter parameters) {
    	super(parameters);
    	setName("-");
    }

    @Override
    public void calc(List<Double> results) {
		//실제 연산
		
    	if (results.size() == 1) {
			results.set(0, results.get(0));
		}
    	
    	while(1 < results .size()) {
			results.set(0, results.get(0) - results.get(1));
			results.remove(1);
		}
    }
}